//package com.site.springboot.core.service.impl;
//
//import com.site.springboot.core.dao.AdminMapper;
//import com.site.springboot.core.entity.SysUser;
//import com.site.springboot.core.service.AdminService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.stereotype.Service;
//
///**
// * Project:springboot-project-news-publish-system
// * ClassName:UserDetailsServiceImpl
// * Package:com.site.springboot.core.service.impl
// * User:CWQ
// * Description:
// *
// * @Author 合肥-陈万琼
// * @Create 2024/5/27 23:25
// * @Version 1.0
// */
//@Service
//public class UserDetailsServiceImpl implements UserDetailsService {
//    @Autowired
//    private AdminService adminService;
//    @Override
//    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//        System.out.println("用户名参数为 = " + username);
//        SysUser sysUser = adminService.getUserDetailByUserName(username);
//        System.out.println("数据库查到的数据是" + sysUser);
//        if (sysUser == null) {
//            throw new UsernameNotFoundException("用户不存在");
//        }
//        return sysUser;
//    }
//}
